package com.njupt.simulation.service.Impl;

import cn.hutool.core.util.IdUtil;
import com.njupt.simulation.Mapper.LeoSatelliteMapper;
import com.njupt.simulation.entity.LeoSatellite;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.njupt.simulation.service.LeoSatelliteService;


@Service
public class LeoSatelliteServiceImpl implements LeoSatelliteService {

    @Autowired
    private LeoSatelliteMapper leoSatelliteMapper;

    @Override
    public LeoSatellite findById(Integer id) {
        LeoSatellite leoSatellite = leoSatelliteMapper.findById(id);
        leoSatellite.setLeoName("sfdgws");
        leoSatelliteMapper.updateById(leoSatellite);
        leoSatelliteMapper.insert(leoSatellite);
        String idf = IdUtil.simpleUUID();
        LeoSatellite leoSatellite1 = new LeoSatellite();
        leoSatellite1.setId(Integer.valueOf(idf));
        leoSatellite1.setLeoName("fjsdhgf");

        return leoSatellite;
    }

    @Override
    public LeoSatellite findBuName(String name) {
        return null;
    }


}
